<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222"><meta name="generator" content="Hexo 6.2.0">

  <link rel="apple-touch-icon" sizes="180x180" href="/images/favicon.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon.png">
  <link rel="mask-icon" href="/images/favicon.png" color="#222">

<link rel="stylesheet" href="/css/main.css">



<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css" integrity="sha256-Z1K5uhUaJXA7Ll0XrZ/0JhX4lAtZFpT6jkKrEDT0drU=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">

<script class="next-config" data-name="main" type="application/json">{"hostname":"it-liupp.gitee.io","root":"/","images":"/images","scheme":"Gemini","darkmode":false,"version":"8.14.1","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":{"enable":false,"style":null},"bookmark":{"enable":true,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":false,"transition":{"menu_item":"fadeInDown","post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"}}</script><script src="/js/config.js"></script>

    <meta property="og:type" content="article">
<meta property="og:title" content="OpenEuler安装Sonatype Nexus（Maven私服）">
<meta property="og:url" content="https://it-liupp.gitee.io/2022/07/30/openeuler-install-sonatypenexus/index.html">
<meta property="og:site_name" content="Hello Mr Liu">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://it-liupp.gitee.io/images/openeuler-install-SonatypeNexus/image-20231219195053049.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/image-20220730105739364.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/image-20220730112451712.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/image-20220730113101496.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/image-20220730113629899.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/image-20220730113722593.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/image-20220730114332346.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/image-20220730114634042.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/image-20220730114847273.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/image-20220730114911746.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/image-20220730115245983.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/image-20220730120308566.png">
<meta property="article:published_time" content="2022-07-30T02:45:57.000Z">
<meta property="article:modified_time" content="2024-01-23T03:36:31.122Z">
<meta property="article:author" content="Mr Liu">
<meta property="article:tag" content="操作系统">
<meta property="article:tag" content="Linux">
<meta property="article:tag" content="OpenEuler">
<meta property="article:tag" content="Maven">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://it-liupp.gitee.io/images/openeuler-install-SonatypeNexus/image-20231219195053049.png">


<link rel="canonical" href="https://it-liupp.gitee.io/2022/07/30/openeuler-install-sonatypenexus/">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"zh-CN","comments":true,"permalink":"https://it-liupp.gitee.io/2022/07/30/openeuler-install-sonatypenexus/","path":"2022/07/30/openeuler-install-sonatypenexus/","title":"OpenEuler安装Sonatype Nexus（Maven私服）"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>OpenEuler安装Sonatype Nexus（Maven私服） | Hello Mr Liu</title>
  






  <script async defer data-website-id="" src=""></script>

  <script defer data-domain="" src=""></script>

  <noscript>
    <link rel="stylesheet" href="/css/noscript.css">
  </noscript>
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <div class="column">
      <header class="header" itemscope itemtype="http://schema.org/WPHeader"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <p class="site-title">Hello Mr Liu</p>
      <i class="logo-line"></i>
    </a>
      <p class="site-subtitle" itemprop="description">临江对月</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger" aria-label="搜索" role="button">
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a></li><li class="menu-item menu-item-about"><a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a></li><li class="menu-item menu-item-tags"><a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a></li>
  </ul>
</nav>




</header>
        
  
  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E8%AF%B4%E6%98%8E"><span class="nav-number">1.</span> <span class="nav-text">一、环境说明</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%BA%8C%E3%80%81%E5%BF%85%E5%A4%87%E7%BB%84%E4%BB%B6"><span class="nav-number">2.</span> <span class="nav-text">二、必备组件</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#2-1JDK1-8"><span class="nav-number">2.1.</span> <span class="nav-text">2.1JDK1.8</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%B8%89%E3%80%81%E5%AE%89%E8%A3%85Sonatype-Nexus"><span class="nav-number">2.2.</span> <span class="nav-text">三、安装Sonatype Nexus</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-1Sonatype-Nexus%E4%BB%8B%E7%BB%8D"><span class="nav-number">2.3.</span> <span class="nav-text">3.1Sonatype Nexus介绍</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-2%E4%B8%8B%E8%BD%BD%E5%AE%89%E8%A3%85"><span class="nav-number">2.4.</span> <span class="nav-text">3.2下载安装</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-3%E5%85%B6%E4%BB%96"><span class="nav-number">2.5.</span> <span class="nav-text">3.3其他</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%B8%89%E3%80%81%E5%85%B6%E4%BB%96%E8%B5%84%E6%96%99"><span class="nav-number">2.6.</span> <span class="nav-text">三、其他资料</span></a></li></ol></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="Mr Liu"
      src="/images/avatar.jpg">
  <p class="site-author-name" itemprop="name">Mr Liu</p>
  <div class="site-description" itemprop="description">和意识先进的人在一起你才能转变意识，和心态积极的人在一起，你才能够积极，靠自己改变很难，一个人拽着自己的头发是很难把自己拎起来的。</div>
</div>
<div class="site-state-wrap animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives/">
          <span class="site-state-item-count">24</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/categories/">
        <span class="site-state-item-count">18</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
          <a href="/tags/">
        <span class="site-state-item-count">32</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="cc-license animated" itemprop="license">
    <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" class="cc-opacity" rel="noopener" target="_blank"><img src="https://cdnjs.cloudflare.com/ajax/libs/creativecommons-vocabulary/2020.11.3/assets/license_badges/big/by_nc_sa.svg" alt="Creative Commons"></a>
  </div>

        </div>
      </div>
    </div>

    
  </aside>


    </div>

    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://it-liupp.gitee.io/2022/07/30/openeuler-install-sonatypenexus/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.jpg">
      <meta itemprop="name" content="Mr Liu">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Hello Mr Liu">
      <meta itemprop="description" content="和意识先进的人在一起你才能转变意识，和心态积极的人在一起，你才能够积极，靠自己改变很难，一个人拽着自己的头发是很难把自己拎起来的。">
    </span>

    <span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
      <meta itemprop="name" content="OpenEuler安装Sonatype Nexus（Maven私服） | Hello Mr Liu">
      <meta itemprop="description" content="">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          OpenEuler安装Sonatype Nexus（Maven私服）
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2022-07-30 10:45:57" itemprop="dateCreated datePublished" datetime="2022-07-30T10:45:57+08:00">2022-07-30</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar-check"></i>
      </span>
      <span class="post-meta-item-text">更新于</span>
      <time title="修改时间：2024-01-23 11:36:31" itemprop="dateModified" datetime="2024-01-23T11:36:31+08:00">2024-01-23</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/" itemprop="url" rel="index"><span itemprop="name">操作系统</span></a>
        </span>
          ，
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/%E8%BD%AF%E4%BB%B6%E5%AE%89%E8%A3%85/" itemprop="url" rel="index"><span itemprop="name">软件安装</span></a>
        </span>
    </span>

  
    <span class="post-meta-break"></span>
    <span class="post-meta-item" title="本文字数">
      <span class="post-meta-item-icon">
        <i class="far fa-file-word"></i>
      </span>
      <span class="post-meta-item-text">本文字数：</span>
      <span>1.4k</span>
    </span>
    <span class="post-meta-item" title="阅读时长">
      <span class="post-meta-item-icon">
        <i class="far fa-clock"></i>
      </span>
      <span class="post-meta-item-text">阅读时长 &asymp;</span>
      <span>5 分钟</span>
    </span>
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
        <p><img src="/../images/openeuler-install-SonatypeNexus/image-20231219195053049.png" alt="image-20231219195053049"></p>
<span id="more"></span>


<p>😁废话不多说，我们直接开始….</p>
<h2 id="一、环境说明"><a href="#一、环境说明" class="headerlink" title="一、环境说明"></a>一、环境说明</h2><blockquote>
<p>操作系统：OpenEuler22.03-LTS</p>
<p>Nexus：3.31.1</p>
<p>JDK：1.8</p>
</blockquote>
<p>关于OpenEuler的安装请参考如下链接：</p>
<p><a href="https://it-liupp.gitee.io/2022/06/29/openeuler-pgsql01/">OpenEuler-PostgreSQL系列（一）：手把手教你安装OpenEuler | Hello Mr Liu (gitee.io)</a></p>
<blockquote>
<p>OpenEuler的配置:</p>
<ul>
<li>1.安装tar解压工具;</li>
<li>2.设置selinux配置为宽容模式.(在上述链接教程的最后有说明,参照配置就可以了)</li>
</ul>
</blockquote>
<h2 id="二、必备组件"><a href="#二、必备组件" class="headerlink" title="二、必备组件"></a>二、必备组件</h2><h3 id="2-1JDK1-8"><a href="#2-1JDK1-8" class="headerlink" title="2.1JDK1.8"></a>2.1JDK1.8</h3><p>安装Nexus目前发现只能使用jdk1.8版本，我安装了jdk17是不行的。而且在运行nexus提示也明确要求使用jdk1.8版本。</p>
<p>所以本文中也不再尝试其他版本，直接安装jdk1.8版本，这里选用的Amazon Corretto OpenJDK8版本。</p>
<p>官方下载地址：<a target="_blank" rel="noopener" href="https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/downloads-list.html">Downloads for Amazon Corretto 8 - Amazon Corretto</a></p>
<p><img src="/../images/image-20220730105739364.png" alt="image-20220730105739364"></p>
<p>这里我们选择rpm包，各位可以根据自己的实际环境选择，如果机器环境已经安装好了jdk1.8，可以跳过本章节。</p>
<p>命令如下：</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token comment"># 下载jdk8</span>
<span class="token function">wget</span> https://corretto.aws/downloads/latest/amazon-corretto-8-x64-linux-jdk.rpm

<span class="token comment"># 安装jdk8(安装路径在/usr/lib/jvm/)</span>
<span class="token function">rpm</span> -ivh amazon-corretto-8-x64-linux-jdk.rpm

<span class="token comment"># 检查jdk安装情况</span>
java -version<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<p>安装图如下：</p>
<p><img src="/../images/image-20220730112451712.png" alt="image-20220730112451712"></p>
<h3 id="三、安装Sonatype-Nexus"><a href="#三、安装Sonatype-Nexus" class="headerlink" title="三、安装Sonatype Nexus"></a>三、安装Sonatype Nexus</h3><h3 id="3-1Sonatype-Nexus介绍"><a href="#3-1Sonatype-Nexus介绍" class="headerlink" title="3.1Sonatype Nexus介绍"></a>3.1Sonatype Nexus介绍</h3><blockquote>
<p>Sonatype Nexus 是Sonatype公司的一个产品，Maven仓库管理器，它可以节省网络带宽也会加速项目搭建的进程。使用它可以创建公司私有的Maven库管理器，管理常用的JAR包，加快项目构建速度。</p>
</blockquote>
<h3 id="3-2下载安装"><a href="#3-2下载安装" class="headerlink" title="3.2下载安装"></a>3.2下载安装</h3><p>很不幸，Nexus官方网站在国内被墙了，我在网上找了几个版本，最新找到3.31.1，也不知道最新是哪个版本，放到百度网盘了，可以自行下载：</p>
<blockquote>
<p>网盘喊了3.13、3.20、3.31三个版本，本文安装3.31.1版本。</p>
<p>链接: <a target="_blank" rel="noopener" href="https://pan.baidu.com/s/1YN2vuq0EGPWA1hhrvKkcLw">https://pan.baidu.com/s/1YN2vuq0EGPWA1hhrvKkcLw</a> 提取码: necl</p>
</blockquote>
<p>这里下载到的客户机，我们是通过ssh连接的OpenEuler服务器，所以可以通过scp命令将安装包上传到服务器，命令如下：</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token comment"># 在客户及终端执行，此时不要ssh连接到服务器。</span>
<span class="token comment"># 将nexus-3.31.1-01-unix.tar.gz以root用户上传到/root路径下</span>
<span class="token function">scp</span> nexus-3.31.1-01-unix.tar.gz root@192.168.1.231:/root<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code></pre>

<p>如图：</p>
<p><img src="/../images/image-20220730113101496.png" alt="image-20220730113101496"></p>
<p>然后我们通过ssh连接到服务器，查看上传的压缩包，并解压，命令如下：</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token comment"># 查看上传的安装包(ssh以root用户登录后默认就在/root目录下)</span>
ll

<span class="token comment"># 将安装包移动到给他准备的目录中（这里以/data为例，以自身情况自行调整）</span>
<span class="token function">mv</span> nexus-3.31.1-01-unix.tar.gz /data/

<span class="token comment"># 切换到/data目录</span>
<span class="token builtin class-name">cd</span> /data/

<span class="token comment"># 解压安装包</span>
<span class="token function">tar</span> -zxvf nexus-3.31.1-01-unix.tar.gz
<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<p>如图：</p>
<p><img src="/../images/image-20220730113629899.png" alt="image-20220730113629899"></p>
<p>解压出来两个文件夹：</p>
<p><img src="/../images/image-20220730113722593.png" alt="image-20220730113722593"></p>
<p>nexus的启动和配置文件在“nexus-3.31.1-01”目录下，“sonatype-work”目录不要动。</p>
<p>nexus的配置文件路径为“nexus-3.31.1-01&#x2F;etc&#x2F;nexus-default.properties”，内容如下：</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token comment">## DO NOT EDIT - CUSTOMIZATIONS BELONG IN $data-dir/etc/nexus.properties</span>
<span class="token comment">##</span>
<span class="token comment"># Jetty section</span>
application-port<span class="token operator">=</span><span class="token number">8081</span>
application-host<span class="token operator">=</span><span class="token number">0.0</span>.0.0
nexus-args<span class="token operator">=</span><span class="token variable">$&#123;jetty.etc&#125;</span>/jetty.xml,<span class="token variable">$&#123;jetty.etc&#125;</span>/jetty-http.xml,<span class="token variable">$&#123;jetty.etc&#125;</span>/jetty-requestlog.xml
nexus-context-path<span class="token operator">=</span>/

<span class="token comment"># Nexus section</span>
nexus-edition<span class="token operator">=</span>nexus-pro-edition
nexus-features<span class="token operator">=</span><span class="token punctuation">\</span>
 nexus-pro-feature

nexus.hazelcast.discovery.isEnabled<span class="token operator">=</span>true<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<p>由上面可以看出web管理界面访问端口是8081，现在先启动nexus：</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token comment"># 切换到nexus-3.31.1-01/bin/ 目录</span>
<span class="token builtin class-name">cd</span> nexus-3.31.1-01/bin/

<span class="token comment"># 启动nexus</span>
./nexus start<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<p>如图：</p>
<p><img src="/../images/image-20220730114332346.png" alt="image-20220730114332346"></p>
<p>看到“Starting nexus”的提示说明启动成功了，但提示也给出了警告，意思是不建议使用root用户启动，实际使用的时候可以创建一个启动neuxs的普通账号来启动，这里就不再解释了。</p>
<p>此时，在服务器外是无法访问的，因为本章的服务器环境并没有关闭防火墙，我们先关闭防火墙后浏览器看一下效果。</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token comment"># 关闭防火墙</span>
systemctl stop firewalld

<span class="token comment"># 查看防火墙状态</span>
systemctl status firewalld<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<p><img src="/../images/image-20220730114634042.png" alt="image-20220730114634042"></p>
<p>现在浏览器访问一下，地址是 ip:8081：</p>
<p><img src="/../images/image-20220730114847273.png" alt="image-20220730114847273"></p>
<p><img src="/../images/image-20220730114911746.png" alt="image-20220730114911746"></p>
<p>如上图所示，我们点击右上角的登录后，会弹出提示告诉你admin的默认密码在“&#x2F;data&#x2F;sonatype-work&#x2F;nexus3&#x2F;admin.password”文件里面，这里网上有说用户名密码默认是“admin&#x2F;admin123”的，其实不是，我们查看一下密码：</p>
<pre class="line-numbers language-none"><code class="language-none"># 查看默认密码
cat &#x2F;data&#x2F;sonatype-work&#x2F;nexus3&#x2F;admin.password<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span></span></code></pre>

<p><img src="/../images/image-20220730115245983.png" alt="image-20220730115245983"></p>
<p>使用默认admin用户和密码登录，会要求设置新密码和一些配置，这里就不再叙述了，后续章节会给出一些Nexus配置相关的链接供参考,至此,Nexus的安装已经结束，没有遇到其他网上提到的问题，如果各位安装过程中遇到问题可以留言讨论。</p>
<h3 id="3-3其他"><a href="#3-3其他" class="headerlink" title="3.3其他"></a>3.3其他</h3><p>在3.2章节的最后，我们关闭了防火墙，是因为防火墙未放开8081端口的访问，但是实际场景中并不推荐关闭防火墙，所以这里也给出在防火墙打开的情况下开放8081端口的方法：</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token comment"># 查看防火墙服务状态</span>
systemctl	status firewalld

<span class="token comment"># 启动防火墙服务（如果已经启动，可以跳过该步骤）</span>
systemctl start firewalld

<span class="token comment"># 开发8081端口</span>
firewall-cmd --zone<span class="token operator">=</span>public --add-port<span class="token operator">=</span><span class="token number">8081</span>/tcp --permanent
<span class="token comment"># --permanent参数代表永久生效，不使用该参数的话开放的端口将会在重启后失效</span>

<span class="token comment"># 重新载入防火墙配置，使配置生效</span>
firewall-cmd --reload

<span class="token comment"># 查看已开放的端口</span>
firewall-cmd --zone<span class="token operator">=</span>public --list-ports<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<p><img src="/../images/image-20220730120308566.png" alt="image-20220730120308566"></p>
<p>防火墙Firewalld相关配置方法可以参考：<a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_40379712/article/details/117963971">firewall-cmd命令限制或开放IP及端口</a></p>
<h3 id="三、其他资料"><a href="#三、其他资料" class="headerlink" title="三、其他资料"></a>三、其他资料</h3><blockquote>
<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_40816738/article/details/121508745"> Nexus 3.31.1 maven 私服 服务器配置篇</a></p>
<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_40816738/article/details/121501309"> Nexus 3.31.1-01搭建 maven 私服 windows</a></p>
<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_40816738/article/details/121509130">Nexus 3.31.1 maven 私服 仓库和IntelliJ IDEA 2021.2 实战篇</a></p>
<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/eussi/article/details/82935964"> CentOS7搭建nexus 3.13.0-01私服</a></p>
<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_42599091/article/details/124981288">nexus(maven仓库)搭建配置maven本地私有仓库</a></p>
</blockquote>

    </div>

    
    
    

    <footer class="post-footer">
          <div class="reward-container">
  <div>☕请作者喝杯咖啡☕</div>
  <button>
    赞赏
  </button>
  <div class="post-reward">
      <div>
        <img src="/images/wechatpay.jpg" alt="Mr Liu 微信">
        <span>微信</span>
      </div>
      <div>
        <img src="/images/alipay.jpg" alt="Mr Liu 支付宝">
        <span>支付宝</span>
      </div>

  </div>
</div>

          

<div class="post-copyright">
<ul>
  <li class="post-copyright-author">
      <strong>本文作者： </strong>Mr Liu
  </li>
  <li class="post-copyright-link">
      <strong>本文链接：</strong>
      <a href="https://it-liupp.gitee.io/2022/07/30/openeuler-install-sonatypenexus/" title="OpenEuler安装Sonatype Nexus（Maven私服）">https://it-liupp.gitee.io/2022/07/30/openeuler-install-sonatypenexus/</a>
  </li>
  <li class="post-copyright-license">
    <strong>版权声明： </strong>本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" rel="noopener" target="_blank"><i class="fab fa-fw fa-creative-commons"></i>BY-NC-SA</a> 许可协议。转载请注明出处！
  </li>
</ul>
</div>

          <div class="post-tags">
              <a href="/tags/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/" rel="tag"># 操作系统</a>
              <a href="/tags/Linux/" rel="tag"># Linux</a>
              <a href="/tags/OpenEuler/" rel="tag"># OpenEuler</a>
              <a href="/tags/Maven/" rel="tag"># Maven</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/2022/06/29/install-openeuler/" rel="prev" title="OpenEuler-PostgreSQL系列（一）：手把手教你安装OpenEuler">
                  <i class="fa fa-chevron-left"></i> OpenEuler-PostgreSQL系列（一）：手把手教你安装OpenEuler
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/2022/12/13/openeuler-bioset/" rel="next" title="Openeuler系统Bioset病毒处理和系统加固">
                  Openeuler系统Bioset病毒处理和系统加固 <i class="fa fa-chevron-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">


<div class="copyright">
  &copy; 
  <span itemprop="copyrightYear">2024</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Mr Liu</span>
</div>
<div class="wordcount">
  <span class="post-meta-item">
    <span class="post-meta-item-icon">
      <i class="fa fa-chart-line"></i>
    </span>
      <span>站点总字数：</span>
    <span title="站点总字数">42k</span>
  </span>
  <span class="post-meta-item">
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
      <span>站点阅读时长 &asymp;</span>
    <span title="站点阅读时长">2:32</span>
  </span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/" rel="noopener" target="_blank">NexT.Gemini</a> 强力驱动
  </div>

    </div>
  </footer>

  
  <div class="back-to-top" role="button" aria-label="返回顶部">
    <i class="fa fa-arrow-up fa-lg"></i>
    <span>0%</span>
  </div>
  <div class="reading-progress-bar"></div>
  <a role="button" class="book-mark-link book-mark-link-fixed"></a>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


  
  <script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
<script src="/js/comments.js"></script><script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/next-boot.js"></script><script src="/js/bookmark.js"></script>

  




  





</body>
</html>
